package com.haydn.practice.restfulweb.mBean;

import com.haydn.practice.restfulweb.entity.ProductStatus;

import java.util.Date;

/**
 * @Author haydn
 * @create 2020/8/29 22:43
 */
public class Count implements CountMBean {

    ProductStatus productStatus = new ProductStatus("无痕内衣",190,new Date());

    //商品编码
    private String code;

    public void setCode(String code) {
        System.out.println("set 商品编码 : " + code);
        this.code = code;
    }

    @Override
    public String getCode() {
        return this.code;
    }

    @Override
    public String printCode() {
        System.out.println("get 商品编码是 ： " + code);
        return code;
    }

    @Override
    public String printProStatus() {

        System.out.println("print : 模拟调用service");
        System.out.println("print : 模拟调用DAO");
        System.out.println("print : 模拟数据库查询");
        System.out.println("print : ProductStatus -- " + productStatus.toString());

        return "Return print : ProductStatus -- " + productStatus.toString();
    }

}
